<template>
	<view class="page">
		<view class="flex flex_row_between order_number twelve_font">
			<text style="font-size: 24rpx;">退货单号：{{item.order_sn}}</text>
			<text></text>
			<text class="" v-if="item.status==0">待审核</text>
			<text class="red_font" v-else-if="item.status==1 || item.status==2">待退款</text>
			<text class="dgreen" v-else-if="item.status==3">已完成</text>
			<text class="gray_font" v-else-if="item.status==4">已取消</text>
			<!-- <text v-else :class="item.status==4? 'gray_font':item.status==0?'red_font':'dgreen'">{{stateList[item.status].name}}</text> -->
		</view>
		<view class="flex flex_row_center">
			<view style="flex-basis: 100%">
			<view class="flex-middle">
				<view class="imgs flex-middle">
					<image class="img" :src="item.img" mode="aspectFit" ></image>
					<!-- <image class="logo" v-if="showLogo==1" :src="logo" mode="aspectFit"></image> -->
				</view>
				<view class="order_info fourteen">
				<view class="flex flex_row_between">
					<view class="">{{item.goods_name}}</view>
					<!-- <view style="color: #adaeaf">
						<text> 共 {{item.sum_order_num}} 件</text>
						<u-icon name="arrow-right" color="gray" size="18" ></u-icon>
					</view> -->
				</view>
				<view> 申请日期：{{item.createdTime}}</view>
				<view> 审核日期：{{item.checkTime}} </view>
				</view>
			</view>
			<view class="total">
				<view style="color:gray">
					申请金额:<text class="">￥{{item.apply_money}}</text> 
				</view>
				<!-- <view style="color:gray">
					差额:<text class="">￥{{Number(item.balance).toFixed(2)}}</text> 
				</view> -->
				<view>
					实退金额:<text class="red_font">￥{{item.real_money}}</text> 
				</view>
			</view>

			<view class="select_button text_right">
				<text class="cancel_order" v-show="item.status==0" @click.stop="clickbtn('cancelOrderReturn',item.id,'取消订单')">取消</text>
			</view>
			</view>
			<!-- <text class="success_pay">支付成功</text> -->
		</view>
	</view>
</template>

<script>
	export default {
		props:['item'],
		data() {
			return {
				logo:'',
				showLogo:0,
				stateList: [
					{name: "待审核",status:0},
					{name: "待退款",status:2},
					{name: "已完成",status:3},
					{name: "已取消",status:4},
				],
			};
		},
		mounted(){
			this.logo = uni.getStorageSync('logo');
			this.showLogo = uni.getStorageSync('showLogo');
		},
		methods:{
			clickbtn(type,id,msg){
				this.$emit('clickbtn',{type,id,msg})
			},
		},
	}
</script>

<style lang="scss" scoped>
.page{
	width: 100%;
	height: 100%;
	.imgs{
		width:120rpx;
		height:120rpx;
		position: relative;
		.logo{
			width:40rpx;
			height:40rpx;
			position: absolute;
			top: 0;
			left:0;
			z-index: 1;
		}
		.img{
			width:112rpx;
			height:80rpx;
			margin-right:22rpx;
		}
	}
    .order_number {
      height: 64rpx;
      line-height: 64rpx;

      border-bottom: 1px solid #ececec;
    }

    .order_info {
      flex-basis: 100%;
	  >view{
		  margin:10rpx 0;
	  }
    }

  .sign_order:nth-child(n + 2) {
    margin-top: 20rpx;
  }

//   .scroll_height {
//     height: calc(100vh - 50px - 318rpx);
//     /* #ifdef APP-PLUS */
//     height: calc(100vh - 50px - 245rpx - var(--status-bar-height));
//     /* #endif */
//   }

  .select_button {
    padding: 26rpx 0;

    .another_order,
    .confirm_pay {
      border-color: #55a68c;
      color: #55a68c;
    }

    .look_logist,
    .cancel_order {
      color: #8f8f8f;
    }

    .confirm_good {
      color: #e53131;
    }
  }

  .select_button > text {
    border: 1px solid;
    padding: 8rpx 22rpx;
    margin-left: 24rpx;
    font-size: 24rpx;
    border-radius: 24rpx;
  }
.top_title{
	.user-icon{
		height: 30rpx;
	}
	.account{
		margin-left:10rpx;
	}
}

}
.total{
	display: flex;
	justify-content: flex-end;
	align-items: center;
	view{
		margin-left:10rpx;
		&:not(:last-of-type){
			font-size: 24rpx;
		}
	}
}
</style>
